<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<title>SpringSecurity</title>
	</head>
	<body>
		这是首页，欢迎<sec:authentication property="name" />！<br />
		<sec:authorize ifAllGranted="ROLE_ADMIN">
			<a href='<c:url value="/admin.jsp" />'>进入管理界面</a><br />
		</sec:authorize>
		<a href='<c:url value="/j_spring_security_logout" />'>退出系统</a><br />
		
		<a href='${pageContext.request.contextPath }/hello?op=sayHello&username=<sec:authentication property="name" />'>问好</a>
		&nbsp;
		<a href='${pageContext.request.contextPath }/hello?op=sayBye&username=<sec:authentication property="name" />'>再见</a>
	</body>
</html>